/**
 * 
 */
package com.ap.core.business.message.validation.handler.impl;

import com.ap.core.business.message.domain.translators.BindingMetaData;
import com.ap.core.business.message.validation.handler.AbstractValidationHandler;
import com.ap.core.business.message.validation.info.impl.RefundOriginalInfoImpl;
import com.ap.core.message.managerefund.info.RequestRetrieveRefundAccountInfo;
import com.ap.core.validation.message.info.MessageValidationInfo;
import com.ap.core.validation.message.info.OriginalInfo;
import com.ap.core.validation.message.info.RefundOriginalInfo;

/**
 * The Class RequestRetrieveRefundAccountValidationHandler.
 *
 * @author Rohit.Dixit
 */
public class RequestRetrieveRefundAccountValidationHandler extends
		AbstractValidationHandler<RequestRetrieveRefundAccountInfo, OriginalInfo> {

	/* (non-Javadoc)
	 * @see com.ap.core.business.message.validation.handler.AbstractValidationHandler#getMessageValidationInfo(com.ap.core.message.info.RequestMessageInfo, com.ap.core.business.message.domain.translators.BindingMetaData)
	 */
	@Override
	protected MessageValidationInfo<RequestRetrieveRefundAccountInfo, OriginalInfo> getMessageValidationInfo(
			final RequestRetrieveRefundAccountInfo request,
			final BindingMetaData metaData) {
		 return new MessageValidationInfo<RequestRetrieveRefundAccountInfo, OriginalInfo>() {

			@Override
			public RequestRetrieveRefundAccountInfo getBoundObject() {
				return request;
			}

			@Override
			public RefundOriginalInfo getOriginalInfo() {
			    return new RefundOriginalInfoImpl(metaData.getBackOfficeOrderPayment());
			}
			
		 };
	}
}
